package com.lry.thompson;

import java.util.Objects;
import java.util.Set;

public class Dfa {

    public int stateNum;//节点编号
    public Set<Nfa> nfaSet;
    public boolean accepted;

    public Dfa(Set<Nfa> nfaSet) {
        this.nfaSet = nfaSet;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        Dfa dfa = (Dfa) o;
        return nfaSet.equals(dfa.nfaSet);
    }

    @Override
    public int hashCode() {
        return Objects.hash(nfaSet);
    }
}
